#pragma once

namespace Tmpl {

class Twister 
{
public:
	Twister();
	~Twister();

	void Init();
	void Init(float scale);
	void Init(unsigned int seed, float scale);

	float GetRandom();
	float GetRandomNegative();
	float GetRandomRange(float min, float max);
private:
	void RandomInit(unsigned int s, float scale);
	void NewRandomState(unsigned int* state, float* output);

	unsigned int* mtStateBase, *mtState;
	float* mtFloatBase, *mtFloat;
	unsigned short mtFloatCounter;
	float mtScale;
};

};